package com.zm.modules.demo.controller;

import com.google.common.collect.Maps;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Collections;
import java.util.Map;

/**
 * @version 1.0
 * @ ClassName DemoController
 * <p> 測試一些系統變量
 * @ author JIMMY
 * @ Date 2020/11/12 0012 下午 7:44
 */
@RestController
@RequestMapping("demo")
public class DemoController {

    @Value("${jimmy.randomV}")
    private String randmonV;

    @Value("${jimmy.randomNum}")
    private String randomNum;

    @RequestMapping("test")
    public Map demo() {
        Map map = Maps.newHashMap();
        map.put("randmonV", randmonV);
        map.put("randomNum", randomNum);
        return map;
    }

}
